package com.luo.chengrui.module.sa.api.org;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import com.luo.chengrui.module.sa.api.org.dto.OrgRespDTO;
import com.luo.chengrui.module.sa.service.org.OrgService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController // 提供 RESTful API 接口，给 Feign 调用
@Validated
public class SaOrgApiImpl implements SaOrgApi {
    @Resource
    private OrgService orgService;


    /**
     * 获取组织下级所有人员信息。
     *
     * @param orgId
     * @return
     */
    @Override
    public CommonResult<List<OrgRespDTO>> getAllPersonMemberListByOrgId(String orgId) {
        return CommonResult.success(orgService.getAllPersonMemberListByOrgId(orgId));
    }
}
